void main(List<String> args) {
  // 调用
  Persion persion = new Persion.getsan(1, 3.14, "name");
  print(persion.age);
  print(persion.height);
  print(persion.name);
  // 父类引用志向子类对象；
  Object obj = "yjh";
  print(obj.toString());
}

class Persion {
  String? name;
  int? age;
  double? height;
  Persion(this.name, this.age);
  // 命名构造函数
  Persion.getsan(this.age, this.height, this.name);
  Persion.fromMap(Map<String, dynamic> map) {
    this.name = map["name"];
    this.age = map["age"];
    this.height = map["heigth"];
  }
  @override
  String toString() {
    // TODO: implement toString
    // return super.toString();
    return "$name $age $height";
  }
}
